package main
import "fmt"

func main() {
    var a interface{} = 1
	val,ok := a.(int)
	if ok {
		fmt.Println("int:",val)
	}

	var b interface{} = "hello"
	val_str,ok := b.(string)
	if ok {
		fmt.Println("string:",val_str)
	}
}
/* -->:
int: 1
string: hello

*/